ProjectName.modules.Category = {
    init: function () {
        this.formValidation();		this.generateAlias();		//this.initCkEditor();
    } ,		initCkEditor : function () {			var config = {	height: 350,	width: 600,	toolbar :	        [		        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','Source', ],		        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],		        ['Styles','Format','Font','FontSize'],		        ['Image','Table','HorizontalRule','SpecialChar','PageBreak'],		        ['TextColor','BGColor']	        ]	};	            $('#description').ckeditor(config);    },			//###    generateAlias: function () {        /*Code to generate seo friendly url */            jQuery('#title').blur(function(){            var categoryName =  jQuery('#title').val();            categoryName = categoryName.replace(/[^\w\s]/gi, '');            categoryName = categoryName.toLowerCase();            seoCategoryName = categoryName.replace(/[\s]/gi, '-');            jQuery('#alias').val(seoCategoryName);        });    }, 	
    formValidation : function () {
        var container = $('div.pageerrorcontainer-validator');
        $("#categoryfrm").validate({
            errorContainer: container,
            errorLabelContainer: $("div.error-iterator", container),
            wrapper: 'div',
            rules: {
                title: {
                    required: true
                },				//###                	alias : {                		required: true			 	},
                description: {
                    required: true
                },
                status: {
                    required: true
                }
            },
            messages: {
                title: {
                    required: "Please enter title."
                },				//###	                alias: {	                    required: "Please enter seo friendly alias."	                },
                description: {
                    required: "Please enter description"
                },
                status: {
                    required: "Please select status."
                }
            }
        });
    }
}

